<template>
  <!-- <a-range-picker :disabledDate="disabledDate" /> -->
  <a-date-picker v-model="val" :disabledDate="disabledDate" />
</template>


<script>
export default {
  data(){
    return {
      val:''
    }
  },
  methods: {
    disabledDate(current) {
      // 获取当前时间
      const currentDate = new Date();
      // 将当前时间转换为不包含时分秒的日期对象
      const currentDay = new Date(
        currentDate.getFullYear(),
        currentDate.getMonth(),
        currentDate.getDate()
      );
      // 禁选当前时间之后的日期
      return current.isAfter(currentDay);
    },
  },
};
</script>

<style scoped lang="less">

</style>
